<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>


<body>
<div class="dangnhap">
            	<?php
					include("ketnoi.php");	
            		if (!$_SESSION["idEmail"])
					{
					 	include("dangnhap.php");
					}
					else
					{							 
						$lenh1="select * from nguoidung where Email='".$_SESSION["idEmail"]."'";
						$kq1=mysql_query($lenh1);
						$row=mysql_fetch_assoc($kq1);
						$idMaND=$row["MaND"];
						$idMaLND=$row["MaLND"];
						$_SESSION["MaND"] = $idMaND;
						$lenh2="select * from thongtinnguoidung where MaND='$idMaND'";
						$kq2=mysql_query($lenh2);
						$row2=mysql_fetch_assoc($kq2);
						$idtenhienthi=$row2["TenHienThi"];
						
						$lenh3="select * from loainguoidung where MaLND='$idMaLND'";
						$kq3=mysql_query($lenh2);
						$row3=mysql_fetch_assoc($kq2);
						$TenLND=$row2["TenLND"];
						
						if($TenLND != "Cá nhân" && $TenLND != "Công ty")
						{
							echo "<font color='#FFFFFF'>Xin Chào: ".$idtenhienthi."</font>";
							?>
							 <div>
							 <a href="#"><font color="#FFFFFF">Quản Trị</font></a> ;
							 <a href="thoat.php"><font color="#FFFFFF">Thoát</font></a>;
							 </div>
							 <?php
						}
						else
						{	 
						   echo "<font color='#FFFFFF'>Xin Chào: ".$idtenhienthi."</font>";
							?>
							 <div>
							 <a href="#"><font color="#FFFFFF">My Accout</font></a> ;
							 <a href="thoat.php"><font color="#FFFFFF">Thoát</font></a>;
							 </div>
							 <?php
						}	
					}
				
				?>		 

            	 
            </div>   
</body>
</html>